package lab02.test06;

public class Circle {
    //属性：double的半径、周长和面积
    double raduis;
    double perimeter;
    double area;
    //行为
    public double getArea() {
        double area=3.14*raduis*raduis;
        System.out.println("面积为："+area);
        return area;
    }

    public double getPerimeter() {
        double perimeter= 2*3.14*raduis;
        System.out.println("周长是："+perimeter);
        return perimeter;
    }

    public static void main(String[] args) {
        Circle circle=new Circle();
        circle.raduis=1;
        circle.getPerimeter();
        circle.getArea();
    }
}
